// TestMain
package yate.proxy;

import java.lang.reflect.Proxy;

/**
 * @author Yate
 * @Date 2011-10-20
 * @description 详细说明
 */
public class TestMain
{
	
	/**
	 * @description 详细说明
	 * @param args
	 */
	public static void main(String[] arg)
	{
		CarCompany a = new CarCompanyImpl();
		CarCompanyHandler handler = new CarCompanyHandler(a);
		// 产生一个新的代理类
		CarCompany com = (CarCompany) Proxy.newProxyInstance(TestMain.class.getClassLoader(),
				new Class[] { CarCompany.class }, handler);
		System.out.println(com.abc("abc","123"));
	}
	
}
